<!--定义侧边栏样式-->
<template>
  <div>
<!--    menu中写一个router就可以根据index的数据跳转到相应的vue-->
    <el-menu

        router
        class="el-menu-vertical-demo"
         style="width: 200px;min-height: 90vh;background-color:#cccbcb">
          <el-menu-item @click="c1" index="user_main" :style="active1" >首页</el-menu-item>
          <el-menu-item @click="c2" index="" :style="active2">物品查询</el-menu-item>


    </el-menu>
  </div>
</template>

<script>

export default {
  name: "Aside_user",

  data(){
    return{
      active1:'text-align: center;font-size: 15px;color: black;font-weight: bold',
      active2:'text-align: center;font-size: 15px;color: black;font-weight: bold',
    }
  },
  methods:{

    c1(){


      this.active1="text-align: center;font-size: 15px;color:royalblue;font-weight: bold;background-color:white"
      this.active2="text-align: center;font-size: 15px;color:black;font-weight: bold;background-color:#cccbcb"

    },
    c2(){
      this.active2="text-align: center;font-size: 15px;color:royalblue;font-weight: bold;background-color:white"
      this.active1="text-align: center;font-size: 15px;color:black;font-weight: bold;background-color:#cccbcb"
    },




   }
}
</script>

<style >

</style>